home *** CD-ROM | disk | FTP | other *** search
/ DarkBASIC - The Ultimate 3D Game Creator / PCactive 8 CD1 - DarkBasic.iso / SOFTWARE / DEMOS / DarkForge2000 / snippets_vol1 / snip_backfill.dba < prev    next >
Encoding:
Text File  |  2000-08-05  |  811 b   |  44 lines

  1. `    ------------------------------------------------------------------------
  2. `    Gradient Fill                               DarkForge Snippet (6/8/2000)
  3. `    ------------------------------------------------------------------------
  4. `
  5. `    Fills the screen with a smooth gradient fill effect.
  6. `    Uncomment out the ink values for different colours.
  7.  
  8. sync rate 0
  9. sync on
  10. hide mouse
  11.  
  12. create bitmap 1,640,240
  13. set current bitmap 0
  14.  
  15. repeat
  16.  
  17. `    dark blue to light blue
  18. `    ink rgb(50,v,200),0
  19.  
  20. `    red and green blend
  21.     ink rgb(255-v,v,0),0
  22.  
  23. `    blue to green blend
  24. `    ink rgb(v/4,v/2,240-v),0
  25.  
  26.     line 0,v,640,v
  27.     inc v
  28.     sync
  29.  
  30. until v=240
  31.  
  32. get image 1,0,0,640,240
  33. set current bitmap 1
  34. paste image 1,0,0
  35. flip bitmap 1
  36. get image 1,0,0,640,240
  37. set current bitmap 0
  38.  
  39. paste image 1,0,240
  40.  
  41. wait key
  42. end
  43.  
  44.